package com.minimalist.common.entity.lindi.vo.tradeapplication;

import com.minimalist.common.config.mybatis.bo.PageReq;
import com.minimalist.common.config.swagger.SchemaEnum;
import com.minimalist.common.entity.lindi.enums.TradeStatusEnum;
import com.minimalist.common.utils.Add;
import com.minimalist.common.utils.Update;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;

import java.io.Serial;
import java.io.Serializable;
import java.util.Objects;

/**
 * 林地指标交易平台_交易指标申请查询实体
 *
 * @author 11987
 */
@Schema(name = "林地指标交易平台_交易指标申请查询实体")
public class LindiTradeApplicationQueryVO extends PageReq implements Serializable{
    @Serial
    private static final long serialVersionUID = 1L;

    // ========== 查询条件 ==========

    @Schema(name = "enterpriseAccountId", description = "企业用户ID", type = "string")
    private Long enterpriseAccountId;

    @NotNull(message = "项目名称不能为空", groups = {Add.class, Update.class})
    @Schema(name = "projectName", description = "项目名称", type = "string")
    private String projectName;

    @NotNull(message = "交易状态不能为空", groups = {Add.class, Update.class})
    @SchemaEnum(implementation = TradeStatusEnum.class)
    @Schema(name = "tradeStatus", description = "交易状态", type = "string")
    private Integer tradeStatus;

    @Schema(name = "projectType", description = "项目类型", type = "string")
    private String projectType;

    public Long getEnterpriseAccountId(){
        return enterpriseAccountId;
    }

    public void setEnterpriseAccountId(Long enterpriseAccountId){
        this.enterpriseAccountId = enterpriseAccountId;
    }

    public String getProjectName(){
        return projectName;
    }

    public void setProjectName(String projectName){
        this.projectName = projectName;
    }

    public Integer getTradeStatus(){
        return tradeStatus;
    }

    public void setTradeStatus(Integer tradeStatus){
        this.tradeStatus = tradeStatus;
    }

    public String getProjectType(){
        return projectType;
    }

    public void setProjectType(String projectType){
        this.projectType = projectType;
    }
    
    @Override
    public boolean equals(Object o){
        if (this == o){
            return true;
        }
        if (o == null || getClass() != o.getClass()){
            return false;
        }
        if (!super.equals(o)){
            return false;
        }
        LindiTradeApplicationQueryVO that = (LindiTradeApplicationQueryVO) o;
        return Objects.equals(enterpriseAccountId, that.enterpriseAccountId) &&
                Objects.equals(projectName, that.projectName) &&
                Objects.equals(tradeStatus, that.tradeStatus) &&
                Objects.equals(projectType, that.projectType);
    }

    @Override
    public int hashCode(){
        return Objects.hash(super.hashCode(), enterpriseAccountId, projectName, tradeStatus, projectType);
    }

    @Override
    public String toString(){
        return "LindiTradeApplicationQueryVO{" +
                "enterpriseAccountId=" + enterpriseAccountId +
                ", projectName='" + projectName + '\'' +
                ", tradeStatus=" + tradeStatus +
                ", projectType='" + projectType + '\'' +
                ", pageNum=" + getPageNum() +
                ", pageSize=" + getPageSize() +
                '}';
    }
}
